"""
@Time ： 2021/10/20 17:47
@Auth ： ChenZhangKun
"""


class Dog(object):
    def __init__(self, name):
        self.name = name

    def game(self):
        print("%s 蹦蹦跳跳的玩耍" % self.name)


class Xiao(Dog):
    def game(self):
        print("%s 飞到天上玩耍" % self.name)


class Person(object):
    def __init__(self, name):
        self.name = name

    def game_with_dog(self, dog):
        print("%s 和 %s 快乐的玩耍" % (self.name, dog.name))
        dog.game()


# 创建狗对象
dog = Xiao("哮天犬")
小明 = Person("小明")
小明.game_with_dog(dog)
